package com.elink.enginerring.dict.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import com.elink.enginerring.dict.co.DictCo;
import com.elink.enginerring.dict.entity.Dict;

public interface DictMapper {
    int insert(Dict dict);
    
    int update(Dict dict);

    List<Dict> select (@Param("dco") DictCo dictCo);
    
    int selectCount (@Param("dco") DictCo dictCo);
    
    Dict selectSingleDict (@Param("byName") String byName);
    
    List<Dict> selectDictByName (@Param("byName") String byName);
    
    int deleteByDictId(int dictId);

	Dict selectByPrimaryKey(Integer dictId);

	@Delete("delete  from dict where find_in_set(dict_id,#{dictIds})")
	void delDict(@Param("dictIds")String dictIds);

	@Delete("delete  from dict where by_name = #{byName}")
	void delOfByName(@Param("byName") String byName);
}